package com.isoftstone.service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.isoftstone.dao.PatientDao;
import com.isoftstone.dao.UserDao;
import com.isoftstone.entity.Department;
import com.isoftstone.entity.Doctor;
import com.isoftstone.entity.Patient;
import com.isoftstone.entity.Register;
import com.isoftstone.entity.Users;
import com.isoftstone.service.PatientService;
import com.isoftstone.service.UserService;

@Service("PatientService")
public class PatientServiceImpl implements PatientService{

	@Autowired
	private PatientDao patientDao;

	@Override
	public List<Patient> getAllPatientList() {
		// TODO Auto-generated method stub
		List<Patient> list=patientDao.getAllPatientList();
		   return list;
	}

	@Override
	public int insertPatient(Patient patient) {
		// TODO Auto-generated method stub
		int i=patientDao.insertPatient(patient);
		return i;
	}

	@Override
	public Patient getPatientBypatient_idcard(String patient_idcard) {
		// TODO Auto-generated method stub
		Patient list= patientDao.getPatientByPatient_idcard(patient_idcard);
		return list;
	}

	@Override
	public List<Department> selectDepartments() {
		// TODO Auto-generated method stub
		return patientDao.selectDepartments();
	}

	@Override
	public List<Doctor> selectDoctors(String dept_id) {
		// TODO Auto-generated method stub
		return patientDao.selectDoctors(dept_id);
	}

	@Override
	public int insertRegister(Register register) {
		// TODO Auto-generated method stub
		return patientDao.insertRegister(register);
	}

	@Override
	public List<Patient> selectPatientByName(Patient entity) {
		// TODO Auto-generated method stub
		List<Patient> list = patientDao.selectPatientByName(entity);
		System.out.println("testtesttesttesttesttesttesttesttest");
		System.out.println(list);
		return list;
	}
	

	


}
